<?php 
$content = "
<div class='main' style='min-width:100%; margin: 0 auto; display:inline-block; padding:20px;'>
	<div> 
	<img src='assets/logo.png' style='box-shadow:2px 2px 5px rgba(0,0,0,0.5); max-width:50px; ' valign='middle'>
	<span style='display:inline-block; font-weight:light; color:white; font-size:30px; text-shadow:2px 2px 5px rgba(0,0,0,0.5);'>Notebubble</span>
	</div>
	
	";
	
				if(isset($settings['locale_not_set']) || isset($_GET['localeset'])){
			$content .= "<br><div style='font-size:15px; text-shadow:2px 2px 5px rgba(0,0,0,0.5); color:white; font-weight:lighter; margin-bottom:-50px;'>".$loc_string['firstrun_locale']."</div>";
		}
	
	$content .= "<div>
		<span class='time' style='display:inline-block; font-weight:light; color:white;font-size: 20vw; text-shadow:2px 2px 5px rgba(0,0,0,0.5);'>".date("h:i",time())."</span>
<br><span class='date' style='margin-top:-20px; display:block; font-weight:light; color:white;font-size: 3vw; text-shadow:2px 2px 5px rgba(0,0,0,0.5);'>".date('d/m/y',time())."</span><br>
	</div>
	
	<div style='font-size:20px; text-shadow:2px 2px 5px rgba(0,0,0,0.5); color:white; font-weight:lighter;'>
	";
	
	$categories = PDO_FetchAll("SELECT count(*) as count FROM chat")[0]['count'];
	$messages = PDO_FetchAll("SELECT count(*) as count FROM message")[0]['count'];
	
	$content .= "$categories ".$loc_string['categories_index_title']." | $messages ".$loc_string['tooltip_messages']."
	</div>
	<div style='font-size:15px; text-shadow:2px 2px 5px rgba(0,0,0,0.5); color:white; font-weight:lighter;'>";
	
	$files = PDO_FetchAll("SELECT count(*) as count FROM attachment")[0]['count'];
	$size = intval(PDO_FetchAll("SELECT SUM(size) as size FROM attachment")[0]['size']/1024);
	
	$content .= "
	$files ".$loc_string['label_files']." | ".$loc_string['label_total_size']." $size kb
	</div>";
	
	if(isset($settings['locale_not_set'])){
	$content .= "<div>
	<br><br><br><br>
		<div style='font-size:15px; text-shadow:2px 2px 5px rgba(0,0,0,0.5); color:white; font-weight:lighter;'>Choose Your Language</div><br>
		<a href='action.php?mode=setlocale&value=english'><img src='assets/english.png' style='width:70px; height:40px;'></a>
		<a href='action.php?mode=setlocale&value=french'><img src='assets/french.png' style='width:70px; height:40px;'></a>
		<a href='action.php?mode=setlocale&value=german'><img src='assets/german.png' style='width:70px; height:40px;'></a>
		<a href='action.php?mode=setlocale&value=italian'><img src='assets/italian.png' style='width:70px; height:40px;'></a>
		<a href='action.php?mode=setlocale&value=japanese'><img src='assets/japanese.png' style='width:70px; height:40px;'></a>
		<a href='action.php?mode=setlocale&value=portuguese'><img src='assets/portuguese.png' style='width:70px; height:40px;'></a>
		<a href='action.php?mode=setlocale&value=spanish'><img src='assets/spanish.png' style='width:70px; height:40px;'></a>
	</div>";
	}
	
$content .= "</div>";

echo renderPage($content);
